<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="util.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        div{
            height: 37px;
        }
        img{
            display: inline-block;
            width: 25px;
            height: 37px;
        }
        span{
            text-align: center;
            line-height: 37px;
            font-size: 20px;
            font-weight: bold;
            display: inline-block;
            vertical-align: top;
            height: 37px;
            background: red;
        }
    </style>
</head>
    
<body>
    <div>
    <img src="" alt="">
    <img src="" alt="">
    <span>:</span>
    <img src="" alt="">
    <img src="" alt="">
    <span>:</span>
    <img src="" alt="">
    <img src="" alt="">

    </div>
    
    <script>
      
        setInterval(function(){
            var time=new Date();
            var h=time.getHours();
            console.log(h)
            var m=time.getMinutes();
            var s=time.getSeconds();
            document.querySelector("img:nth-of-type(1)").src="./img/"+parseInt(h/10)+".png"
            document.querySelector("img:nth-of-type(2)").src="./img/"+h%10+".png"
            document.querySelector("img:nth-of-type(3)").src="./img/"+parseInt(m/10)+".png"
            document.querySelector("img:nth-of-type(4)").src="./img/"+m%10+".png"
            document.querySelector("img:nth-of-type(5)").src="./img/"+parseInt(s/10)+".png"
            document.querySelector("img:nth-of-type(6)").src="./img/"+s%10+".png"
            
        },200)
    </script>
</body>
</html>